<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>系统管理</title>
<%@ include file="/common/util.jsp"%>
<script type="text/javascript">
$(document).ready(function(){
    $("#addGatewayImageForm").validate({
        rules: {
          'gatewayid': {
            required: true
          }
        },
        messages: {
          'gatewayid': {
            required: "网关ID",
          }
        }
    });
});
</script>
</head>
<body class="main">
	<div class="-frame -style -luster" id="css_container">
		<!--首页框架页眉部分↓-->
		<%@ include file="/WEB-INF/pages/inc/header.jsp"%>
		<!--首页框架页眉部分↑-->

		<div class="content">

			<!-- Left导航菜单◎开始 -->
			<%@ include file="/WEB-INF/pages/inc/leftmenu.jsp"%>
			<!-- Left导航菜单◎结束 -->

			<div class="main-mid">
				<div class="pos"><img src="${cdnctx}/src/index/img/index.png"><a href="<%--${cdnctx}/system/systemMenu.shtml--%>">系统管理  ></a><a href="${cdnctx}/gatewayImage/gatewayImageInit.shtml">网关图片管理</a><a>>添加/修改网关图片</a></div>
				<div class="css_contentDiv">
					<div class="searchDetailed  c-border-radius  b-box-shadow">
					<form id="addGatewayImageForm" method="post" enctype="multipart/form-data" action="${cdnctx}/gatewayImage/saveGatewayImage.shtml">
					  <input type="hidden"  name="id" value="${gatewayImage.id}"/>
					  <table align="center" width="500" border="0" cellspacing="0" cellpadding="0">
         				 <tr>
         				 	 <td width="91" height="36" class="mainText"><label class="formlabel"><font color="red">*</font>网关ID：</label></td>
         				 	 <td>
         				 	 <select id="gatewayid"  class="form_select large" name="gatewayid">
         				 	 	<option value="">--请选择--</option>
         				 	 	<c:forEach items="${gatewayIDlist}" var="entity" varStatus="status">
		                      		<option value="${entity}" <c:if test="${entity==gatewayImage.gatewayid}">selected</c:if>>${entity}</option>
		                      	</c:forEach>
		                  	</select>
         				 	 </td>
         				 </tr>
         				 <tr id="sensorInput">
         				 	 <td width="91" height="36" class="mainText"><label class="formlabel">设备ID：</label></td>
         				 	 <td>
         				 	 <input type="text" class="form_input large" name="sensorid" id="sensorid" value="${gatewayImage.sensorid}"  />
         				 	 </td>
         				 </tr>
         				  <tr id="channelInput">
         				 	 <td width="91" height="36" class="mainText"><label class="formlabel">通道ID：</label></td>
         				 	 <td>
         				 	 <input type="text" class="form_input large" name="channelid" id="channelid" value="${gatewayImage.channelid}"  />
         				 	 </td>
         				 </tr>
         				 <tr>
         				 	 <td width="91" height="36" class="mainText"> <label class="formlabel">备注：</label></td>
         				 	 <td>
         				 	 <input type="text" class="form_input large" id="memo" name="memo" value="${gatewayImage.memo}"/>
         				 	 </td>
         				 </tr>
       
         				 <tr>
         				 <!-- </form>   -->
         				 <td width="91" height="36" class="mainText"><lable class="formlabel">上传文件：</lable></td>
         				 <td>
					         <input id="uploadfile" type="file" name="fileUpload" accept="image/*" class="form_input large" onchange="uploadFileChange();"/>  
						</td>
                        <td><a href="/images/${gatewayImage.imgNameWithSuffix}" target="view_window"><img style="width:60px;" src="/images/${gatewayImage.imgNameWithSuffix}" alt="" /></a></td>
						</tr>
         				 <tr >
         				 	 <td></td>
					         <td>
				               <input type="submit" class="form_save" value="保&nbsp;存"/>
							   <input type="reset" class="form_cancle" value="取&nbsp;消"/>
			              	</td>
         				 </tr>
         				</table>
         				
              			</form>

              		</div>
				</div>
			</div>

		</div>

		<!--首页框架页尾部分↓-->
		<%@ include file="/WEB-INF/pages/inc/footer.jsp"%>
		<!--首页框架页尾部分↑-->
	</div>
</body>
</html>